<%@ page import="User.User" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2019/4/28
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>Home</title>
    <link href="home/css/bootstrap.css" rel="stylesheet" type="text/css" media="all">
    <style type="text/css">
        p{
            margin: 10px 10px 15px 10px;
        }
        .con4 {
            width: 300px;
            height: auto;
            overflow:hidden;
            margin: 30px auto;
            color: #FFFFFF;
        }

        .con4 .btn {
            width:68%;
            height: 40px;
            line-height: 30px;
            text-align: center;
            background: #de995e;
            display: block;
            font-size: 15px;
            border-radius: 3px;
        }
        .file{
            display: block;
            width: 100%;
            height: 40px;
            position: absolute;
            left: 0;
            top: 0;
            opacity: 0;
            border-radius: 5px;
        }

        a{
            display: inline-block;
            height: 40px;
            margin: 5px;
            padding: 16px 20px 0 20px;
            background: #de995e;
            font-size: 16px;
            font-weight: 300;
            line-height: 16px;
            color: #fff;
            text-decoration:none;
            -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
            border: none;
        }
        a:hover{
            text-decoration:none;
            outline: 0;
            opacity: 0.6;
            color: #fff;
        }
        img{
            border: 1px solid #fff;
            margin:80px 80px 15px 80px
        }
        body{
            background: no-repeat 0px 0px url("home/images/6.jpg");
            background-size:cover;
        }
        input{
            margin:5px 5px 5px 130px;
        }
    </style>

</head>
<body>
<%!
    String name=null;
    String email=null;
    String img=null;
    String id=null;
%>
<%
    User user = (User)request.getSession().getAttribute("SELF");
    if(user != null)
    {
        name = user.getName();
        email = user.getEmail();
        id = user.getDgutid();
        img = user.getImg();
    }
%>
<div style="float: right">
    <a href = "/Exit">退出</a>
</div>
<div>
    <div>

        <div class="con4" style="float: left;">
            <img src=<%=img%> width="200" height="180">
            <form action="/uploadImg" enctype="multipart/form-data" method ="post">
                <input type="file" name="img" id="img" >
                <input type="submit" name="upload" class="input2" style="color: #0f0f0f"/>
            </form>
        </div>
        <script>

        </script>
    </div>
</div>
<div>
    <div>
        <div>
            <div class="col-md-6 study-grid" style="color:#fff; margin: 80px 0px 150px 200px">

                <h3><strong>个人信息</strong></h3>
                <hr>
                <div>
                    <p>用户名：<%=name%></p>
                    <p>邮箱:<%=email%></p>
                    <p>莞工账户:<%=id%></p>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>
